package com.dingyuhang.bean;

import java.io.Serializable;


public class City  implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 5224239996571870907L;
	
	private Integer id;
	private Integer pid;
	private String name;
	private Integer type;
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Integer getPid() {
		return pid;
	}
	public void setPid(Integer pid) {
		this.pid = pid;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	public City(Integer id, Integer pid, String name, Integer type) {
		super();
		this.id = id;
		this.pid = pid;
		this.name = name;
		this.type = type;
	}
	public City() {
		super();
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		City other = (City) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "City [id=" + id + ", pid=" + pid + ", name=" + name + ", type=" + type + "]";
	}

}
